package org.niit.app

import org.apache.spark.streaming.dstream.DStream
import org.niit.bean.Answer
import org.niit.common.TApp
import org.niit.controller.EDURealTimeController
import org.niit.handler.DataHandler

/**
 * Date:2025/6/11
 * Author：Ys
 * Description:
 */
object EDURealTimeApp extends TApp{
  val eduRealTimeController = new EDURealTimeController()
  start(appName = "EDURealTimeApp"){

    val answerData: DStream[Answer] = DataHandler.kafkaAnswerDataHandler("BD1", "edu")//获得Kafka的数据

    eduRealTimeController.dispatch(answerData)
    //调用Controller

    DataHandler.startAndAwait()//启动并等待

  }

}
